//
//  UIBarButtonItem-Extension.swift
//  WeiBoDemo
//
//  Created by mac on 2017/11/20.
//  Copyright © 2017年 mac. All rights reserved.
//

import UIKit

extension UIBarButtonItem {
    /*
    convenience init(imageName : String) {
        self.init()
        let btn  = UIButton()
        btn.setImage(UIImage.init(named: imageName), for: .normal)
        btn.setImage(UIImage.init(named: imageName + "_highlighted"), for: .highlighted)
        btn.sizeToFit()
        self.customView = btn
    }
 */
    convenience init(imageName : String) {
        let btn  = UIButton()
        btn.setImage(UIImage.init(named: imageName), for: .normal)
        btn.setImage(UIImage.init(named: imageName + "_highlighted"), for: .highlighted)
        btn.sizeToFit()
        self.init(customView : btn)
    }
}
